<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import = "com.weibo.dao.connDB" %>

<%	

String nameLogin = (String)session.getAttribute("nickname");
//System.out.println("!!!!!!!!!!!!!!!"+nameLogin);
connDB db = new connDB();
db.getConnection();

String[] name = new String[100]; 
int counter = 1;

String sql = "select * from user where nickname != '"+nameLogin+"' ";	

db.rs = db.executeQuery(sql);

while(db.rs.next())
{
	
   name[counter]= db.rs.getString("nickname");
   
   counter+=1;
   }

//System.out.println(nameLogin+" "+name);
/*when being finished couter also plus 1*/
int count = counter-1;
%>

<table>
<tr><a href = "home.jsp">Back To Home</a></tr>
<% 

do{%>
<tr >
                    <td height="112" align="center" valign="bottom"><img src="http://pic.cnblogs.com/face/u160412.jpg" alt="" /><input type="text" name="textfield3" value=<%=name[count]%> size="10"/></td>
                    <td align="center" valign="middle"><form id="form4" name="form4" method="post" action="">
                      <label>
                       <% 
                       out.println("<a href=\"follow_act.jsp?FocusName="+name[count]+"\">focus</a>");count--;}while(count>0);%>
                        </label>
                    </form>
                    </td>
</tr>
</table>

